/*
 * @(#)Message.java
 *
 * Copyright (c) 2024 NTTDATA Corporation.
 */

package com.matt.docpro.model;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;

/**
 * Message
 * Created by 2024/03/04.
 */
@Data
public class Message {
    String id;
    String senderId;
    String receiverId;
    String content;
    Date time;
    boolean isRead;

    public String getFormatTime() {
        if (time == null) {
            return "";
        }
        return DateUtil.format(time, "yyyy/MM/dd HH:mm");
    }
}
